import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';
import p001 from './p001';
import render from '@dfeidao/atom-web/render/render';
import set from '@dfeidao/atom-web/local/set';
interface Par {
	sub_process_no: string,
	sub_process_des: string,
	_id: string
}

export default async function a001(fd: IFeidaoAiBrowserComponent, d: Par) {
	set(fd, 'sub_no', d[0].sub_process_no);
	set(fd, '_id', d[0]._id);

	render(fd, d, p001, 'p001', 'inner');
	// 编辑窗口
	const n = fd.data.node.querySelector<HTMLDivElement>('[data-id="edit"]');
	set_node_cls(n, 'display-n', false);
}
